// 文件路径: src/main/java/com/macro/mall/tiny/modules/pms/service/ProductSkuService.java
package com.macro.mall.tiny.modules.pms.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.macro.mall.tiny.modules.pms.dto.ProductSkuAttrValueParam;
import com.macro.mall.tiny.modules.pms.dto.ProductSkuParam;
import com.macro.mall.tiny.modules.pms.dto.ProductSkuQueryParam;
import com.macro.mall.tiny.modules.pms.model.ProductSku;
import com.macro.mall.tiny.modules.pms.dto.ProductSkuResponse;


import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public interface ProductSkuService extends IService<ProductSku> {

    // 在 ProductSkuService.java 中修改 list 方法签名
    Page<ProductSku> list(ProductSkuQueryParam queryParam, Integer pageSize, Integer pageNum);

    /**
     * 分页查询商品SKU(支持属性值查询)
     */
    Page<ProductSku> listWithAttrValue(ProductSkuQueryParam queryParam, Integer pageSize, Integer pageNum);

    /**
     * 根据ID获取商品SKU信息
     */
    ProductSku getItem(Long id);

    // 在 ProductSkuService.java 中添加
    ProductSkuResponse getDetailItem(Long id);

    /**
     * 添加商品SKU及属性值
     */
    boolean create(ProductSkuParam productSkuParam);

    /**
     * 更新商品SKU及属性值
     */
    boolean update(Long id, ProductSkuParam productSkuParam);

    /**
     * 删除商品SKU
     */
    boolean delete(Integer id);


    Map<Integer, List<ProductSkuAttrValueParam>> batchGetAttrValues(List<Integer> skuIds);

}
